<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="keywords" content="uView Pro" />
    <meta
      name="description"
      content="uView Pro,基于Vue3+TS全面重构的80+精选UI组件库"
    />
    <link
      rel="icon"
      href="https://ik.imagekit.io/anyup/uview-pro/common/favicon.ico"
    />
    <title>uView Pro | Make coding magic！</title>
    <style>
      html,
      body,
      #app {
        width: 100%;
        height: 100%;
        background-color: var(--colorful-bg);
        font-family: var(--colorful-font-family-base);
        font-size: 16px;
        color: var(--colorful-text-2);
        overflow: hidden;
        margin: 0;
      }

      /* 阿里图标库初始化 */
      .icon {
        width: 1em;
        height: 1em;
        vertical-align: -0.15em;
        fill: currentColor;
        overflow: hidden;
      }

      :root {
        --vp-home-hero-name-color: transparent;
        --vp-home-hero-name-background: -webkit-linear-gradient(
          120deg,
          #3445fe 30%,
          #41d1ff
        );

        --vp-home-hero-image-background-image: linear-gradient(
          -45deg,
          #3445fe 50%,
          #47caff 50%
        );
        --vp-home-hero-image-filter: blur(44px);
      }

      @media (min-width: 640px) {
        :root {
          --vp-home-hero-image-filter: blur(56px);
        }
      }

      @media (min-width: 960px) {
        :root {
          --vp-home-hero-image-filter: blur(68px);
        }
      }

      /* 基础颜色 */
      :root {
        --colorful-white: #ffffff;
        --colorful-black: #000000;
        --colorful-black-half-opacity: RGBA(0, 0, 0, 0.5);
        --colorful-brand: #646cff;
        --colorful-brand-light: #747bff;
        --colorful-brand-lighter: #9499ff;
        --colorful-brand-lightest: #bcc0ff;
        --colorful-brand-dark: #535bf2;
        --colorful-brand-darker: #454ce1;
        --colorful-brand-dimm: rgba(100, 108, 255, 0.08);
      }

      /* 页面两边的空白距离 */
      :root {
        --page-padding: 32px;
      }

      @media (max-width: 900px) {
        :root {
          --page-padding: 16px;
        }
      }

      /* 背景颜色 */
      :root {
        --colorful-bg: #1e1e20;
        --colorful-bg-soft: #161618;
        --colorful-bg-half-opacity: RGBA(30, 30, 32, 0.5);
      }

      /* 高度 */
      :root {
        --colorful-header-height: 64px;
      }

      /* 文字颜色 */
      :root {
        --colorful-text-1: var(--colorful-white);
        --colorful-text-2: #fffff5db;
        --colorful-text-3: var(--colorful-brand);
      }

      /* 边框颜色 */
      :root {
        --colorful-border-color-1: rgba(82, 82, 89, 0.32);
        --colorful-border-1: 1px solid var(--colorful-border-color-1);
      }

      /* 背景颜色 */
      :root {
        --colorful-bg: white;
        --colorful-bg-soft: white;
        --colorful-bg-half-opacity: white;
      }

      /* 文字颜色 */
      :root {
        --colorful-text-1: var(--colorful-white);
        --colorful-text-2: #000005db;
        --colorful-text-3: var(--colorful-brand);
      }

      /* 滚动条相关颜色 */
      :root {
        --colorful-scroll-thumb-color: #686868;
        --colorful-scroll-track-color: #424242;
      }

      ::-webkit-scrollbar {
        /*滚动条整体样式*/
        width: 0;
        height: 0;
        /*高宽分别对应横竖滚动条的尺寸*/
      }

      ::-webkit-scrollbar-thumb {
        /*滚动条里面小方块*/
        background-color: var(--colorful-scroll-thumb-color);
        border-radius: 20px;
      }

      ::-webkit-scrollbar-track {
        /*滚动条里面轨道*/
        /* 阴影 */
        -webkit-box-shadow: inset 0 0 5px var(--colorful-black);
        background: var(--colorful-scroll-track-color);
      }

      .fs12 {
        font-size: 12px;
      }

      .fs14 {
        font-size: 14px;
      }

      .fwb {
        font-weight: bold;
      }

      .text-over-flow {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .cp {
        cursor: pointer;
      }

      .spinner-box {
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
      }
      .spinner {
        height: 50px;
        width: 50px;
        background: transparent;
        border: blue 3px solid;
        border-top: transparent;
        border-radius: 50%;
        animation: animate81323 0.8s linear infinite;
      }

      @keyframes animate81323 {
        0% {
          border: 3px solid rgb(75, 141, 255);
          border-top: transparent;
          border-left: transparent;
          transform: rotate(0deg);
        }

        50% {
          border: 3px dashed rgb(41, 203, 240);
          border-top: transparent;
          border-left: transparent;
          transform: rotate(270deg);
        }

        100% {
          border: 3px dotted rgb(28, 228, 28);
          border-top: transparent;
          border-left: transparent;
          transform: rotate(360deg);
        }
      }
    </style>
    <style>
      /* nav-menu start */
      .nav-menu {
        width: 100%;
        height: var(--colorful-header-height);
        position: fixed;
        top: 0;
      }
      .show-border {
        border: 1px dashed #00bfff;
        border-radius: 8px;
        padding: 10px;
      }
      .show-title {
        text-decoration: none;
        cursor: pointer;
        background: linear-gradient(-60deg, #001aff 0, #00e1ff 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: bold;
        font-size: 18px;
      }
      .show-title:hover {
        opacity: 0.7;
      }
      @media (max-width: 700px) {
        .show-title {
          font-size: 13px;
        }
      }

      .mask {
        width: 100%;
        height: 100%;
        background-color: var(--colorful-bg-half-opacity);
        box-shadow: 0 -1px 0 hsla(0, 0%, 100%, 0.1) inset;
        backdrop-filter: blur(12px);
      }
      .logo {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: var(--page-padding);
      }
      .logo-img-box {
        width: 32px;
        height: 32px;
      }
      .logo-img {
        width: 100%;
        height: 100%;
      }
      .logo-title {
        font-size: 24px;
        margin-left: 8px;
        background: linear-gradient(-60deg, #001aff 0, #00e1ff 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }

      @media (max-width: 640px) {
        .logo-title {
          font-size: 18px;
        }
      }

      .navs {
        display: flex;
        justify-content: flex-start;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: var(--page-padding);
      }
      .navs .nav:hover {
        color: var(--colorful-brand);
      }
      .navs .nav.active {
        color: var(--colorful-brand);
      }
      /* nav-menu end */
      canvas {
        display: block;
      }
      .copyright {
        cursor: pointer;
        position: fixed;
        bottom: 10px;
        width: 100%;
        text-align: center;
        line-height: 25px;
        font-size: 14px;
      }
      /* writer-box start */
      .writer-box {
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: none;
        flex-direction: column;
        text-align: center;
      }

      .text {
        overflow: hidden;
        white-space: nowrap;
        animation: typeEffect 6s steps(70) infinite;
        font-size: 36px;
        margin-top: 30px;
        font-weight: bold;
        border-right: 0.1em solid; /* 模拟光标 */
      }

      .Chinese {
        letter-spacing: 0.05em;
      }

      @keyframes typeEffect {
        0% {
          width: 0;
        }
        50% {
          width: 100%;
        }
        60% {
          width: 100%;
        }
        100% {
          width: 0;
        }
      }

      /* 可选：添加闪烁光标的动画 */
      @keyframes blink {
        50% {
          border-color: transparent;
        }
      }
      /* writer-box end */
      /* logo start */
      .image {
        order: 1;
        margin: -76px -24px -48px;
      }
      @media (min-width: 960px) {
        .image {
          flex-grow: 1;
          order: 2;
          margin: 0;
          min-height: 100%;
        }
      }

      @media (min-width: 640px) {
        .image {
          margin: -108px -24px -48px;
        }
      }

      .image-container {
        position: relative;
        margin: 0 auto;
        width: 320px;
        height: 320px;
      }
      @media (min-width: 960px) {
        .image-container {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 100%;
          height: 100%;
          transform: translate(-32px, -32px);
        }
      }
      @media (min-width: 640px) {
        .image-container {
          width: 392px;
          height: 392px;
        }
      }

      .image-bg {
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        width: 192px;
        height: 192px;
        background-image: var(--vp-home-hero-image-background-image);
        filter: var(--vp-home-hero-image-filter);
        transform: translate(-50%, -50%);
      }
      @media (min-width: 960px) {
        .image-bg {
          width: 320px;
          height: 320px;
        }
      }

      @media (min-width: 640px) {
        .image-bg {
          width: 256px;
          height: 256px;
        }
      }

      .image-src {
        position: absolute;
        top: 50%;
        left: 50%;
        max-width: 192px;
        max-height: 192px;
        transform: translate(-50%, -50%);
      }
      @media (min-width: 960px) {
        .image-src {
          max-width: 320px;
          max-height: 320px;
        }
      }
      @media (min-width: 640px) {
        .image-src {
          max-width: 256px;
          max-height: 256px;
        }
      }
      /* logo end */
      @media (max-width: 900px) {
        .copyright {
          font-size: 12px;
        }
        .text {
          font-size: 24px;
        }
      }
      @media (max-width: 500px) {
        .text {
          font-size: 17px;
        }
      }
    </style>
  </head>
  <body>
    <div class="nav-menu">
      <div class="mask"></div>
      <div class="logo cp">
        <div class="logo-img-box">
          <img
            src="https://ik.imagekit.io/anyup/uview-pro/logo/default.png?updatedAt=1756292932046"
            class="logo-img"
          />
        </div>
        <div class="logo-title fwb">uView Pro</div>
      </div>
      <!-- <div class="navs show-title show-border">
        <a class="nav cp active" href="https://uviewpro.cn/">
          立即进入 >
        </a>
      </div> -->
    </div>
    <div class="homepage-view">
      <canvas id="canvas" class="canvas"></canvas>
      <div class="writer-box">
        <div class="writer">
          <div class="logo-image">
            <div class="image">
              <div class="image-container">
                <div class="image-bg"></div>
                <img
                  class="image-src"
                  src="https://ik.imagekit.io/anyup/uview-pro/logo/removebg.png?updatedAt=1756292932046"
                  alt="VitePress"
                />
              </div>
            </div>
          </div>
          <div class="text">
            uView Pro，
            <span class="Chinese">Make coding magic！</span>
          </div>
        </div>
      </div>
      <div
        class="bottom-btn-group"
        style="
          width: 100%;
          text-align: center;
          position: fixed;
          bottom: 100px;
          z-index: 2;
        "
      >
        <a
          class="nav cp show-title show-border"
          href="https://uviewpro.cn/"
          style="margin: 0 12px"
        >
          uView Pro 开发文档 >
        </a>
      </div>
      <div class="copyright">
        <a href="https://beian.miit.gov.cn/" target="_blank">鲁ICP备2021040594号-5</a>
        <div>Copyright © 2025 uView Pro</div>
      </div>
    </div>
    <script>
      /* eslint-disable no-plusplus */
      /* eslint-disable max-classes-per-file */

      const E = {
        friction: 0.5,
        trails: 20,
        size: 50,
        dampening: 0.25,
        tension: 0.98
      }

      class Wave {
        phase = 0

        offset = 0

        frequency = 0.001

        amplitude = 1

        constructor(e) {
          this.phase = e.phase || 0
          this.offset = e.offset || 0
          this.frequency = e.frequency || 0.001
          this.amplitude = e.amplitude || 1
        }

        update() {
          this.phase += this.frequency
          return this.offset + Math.sin(this.phase) * this.amplitude
        }
      }

      class Node {
        x = 0

        y = 0

        vy = 0

        vx = 0
      }

      class Line {
        spring = 0.1

        friction = 0.01

        nodes = []

        pos = {
          x: 0,
          y: 0
        }

        // eslint-disable-next-line no-unused-vars
        constructor(e, pos) {
          this.spring = e.spring + 0.1 * Math.random() - 0.05
          this.friction = E.friction + 0.01 * Math.random() - 0.005
          this.nodes = []
          for (let i = 0; i < E.size; i++) {
            const t = new Node()
            t.x = this.pos.x
            t.y = this.pos.y
            this.nodes.push(t)
          }
        }

        update() {
          let { spring } = this
          let node = this.nodes[0]

          node.vx += (this.pos.x - node.x) * spring
          node.vy += (this.pos.y - node.y) * spring

          let prevNode
          for (let i = 0; i < this.nodes.length; i++) {
            node = this.nodes[i]

            if (i > 0) {
              prevNode = this.nodes[i - 1]
              node.vx += (prevNode.x - node.x) * spring
              node.vy += (prevNode.y - node.y) * spring
              node.vx += prevNode.vx * E.dampening
              node.vy += prevNode.vy * E.dampening
            }

            node.vx *= this.friction
            node.vy *= this.friction
            node.x += node.vx
            node.y += node.vy
            spring *= E.tension
          }
        }

        draw(ctx) {
          let currNode
          let nextNode
          let { x } = this.nodes[0]
          let { y } = this.nodes[0]

          ctx.beginPath()
          ctx.moveTo(x, y)

          let i
          for (i = 1; i < this.nodes.length - 2; i++) {
            currNode = this.nodes[i]
            nextNode = this.nodes[i + 1]
            x = 0.5 * (currNode.x + nextNode.x)
            y = 0.5 * (currNode.y + nextNode.y)
            ctx.quadraticCurveTo(currNode.x, currNode.y, x, y)
          }
          currNode = this.nodes[i]
          nextNode = this.nodes[i + 1]
          ctx.quadraticCurveTo(currNode.x, currNode.y, nextNode.x, nextNode.y)

          ctx.stroke()
          ctx.closePath()
        }
      }

      const renderCanvas = () => {
        const canvas = document.getElementById('canvas')

        const ctx = canvas.getContext('2d')

        let lines = []
        const pos = { x: 0, y: 0 }
        const wave = new Wave({
          phase: Math.random() * 2 * Math.PI,
          amplitude: 85,
          frequency: 0.0015,
          offset: 285
        })
        let running = true
        function resizeCanvas() {
          ctx.canvas.width = window.innerWidth
          ctx.canvas.height = window.innerHeight
        }

        resizeCanvas()

        function animate() {
          if (running) {
            ctx.globalCompositeOperation = 'source-over'
            ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height)
            ctx.globalCompositeOperation = 'lighter'
            ctx.strokeStyle = `hsla(${Math.round(wave.update())},90%,50%,0.25)`
            ctx.lineWidth = 1
            for (let i = 0; i < E.trails; i++) {
              const line = lines[i]
              line.update()
              line.draw(ctx)
            }
            window.requestAnimationFrame(animate)
          }
        }

        function bindMouseMove(event) {
          function drawLine() {
            lines = []
            for (let i = 0; i < E.trails; i++) {
              lines.push(
                new Line({ spring: 0.45 + (i / E.trails) * 0.025 }, pos)
              )
            }
          }
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          function move(e) {
            e.preventDefault()
            if (e.touches) {
              pos.x = e.touches[0].pageX
              pos.y = e.touches[0].pageY
            } else {
              pos.x = e.clientX
              pos.y = e.clientY
            }
          }
          function start(e) {
            if (e.touches.length === 1) {
              pos.x = e.touches[0].pageX
              pos.y = e.touches[0].pageY
            }
          }
          document.removeEventListener('mousemove', bindMouseMove)
          document.removeEventListener('touchstart', bindMouseMove)
          document.addEventListener('mousemove', move)
          document.addEventListener('touchmove', move)
          document.addEventListener('touchstart', start)
          move(event)
          drawLine()
          animate()
        }

        document.addEventListener('mousemove', bindMouseMove)
        document.addEventListener('touchstart', bindMouseMove)
        document.body.addEventListener('orientationchange', resizeCanvas)
        window.addEventListener('resize', resizeCanvas)
        window.addEventListener('focus', () => {
          if (!running) {
            running = true
            animate()
          }
        })
        window.addEventListener('blur', () => {
          running = true
        })
      }
    </script>
    <script>
      const isMobile = () => {
        // 用户代理字符串
        const userAgentInfo = navigator.userAgent
        // 匹配手机设备
        const mobileAgents = [
          'Android',
          'iPhone',
          'SymbianOS',
          'Windows Phone',
          'iPad',
          'iPod'
        ]
        return mobileAgents.some(agent => userAgentInfo.indexOf(agent) > 0)
      }

      const gotoLink = () => {
        window.open('https://beian.miit.gov.cn/')
      }

      if (!isMobile()) {
        // renderCanvas();
      }
    </script>
  </body>
</html>
